import pymongo
client = pymongo.MongoClient(host='127.0.0.1', port=27017)

db = client.test
collection = db.students
# student = { 'id': '20170101', 'name': 'Jordan', 'age': 20, 'gender': 'male' }
#
# result = collection.insert_one(student)
# s={'name':'Jordan'}
# newvalues = {"$set": {"name": "12345"}}
# #
# sd=collection.update_many(s, newvalues)

myquery = {"name": "12345"}

# collection.delete_one(myquery)
collection.delete_many(myquery)
for x in collection.find():
    print(x)
# print(result)